from myelin.Ns import MYELIN, MYELINS

from nodetypes.ntypes.Document import Document
from nodetypes.Ns import NODETYPE_NS
from nodetypes.models.Container import Container as ContainerModel

import showGroupings, \
    showContains

class Container(Document):
    
    typeInfo = {
        'key' : u'container',
        'name' : u'Container',
        'namespace-uri' : NODETYPE_NS,
    }
    
    model = ContainerModel
    
    ACTIONS = {
        'show-contains'     : showContains.TRANSFORMS,
        'show-groupings'    : showGroupings.TRANSFORMS,
    }
    
    #ACTIONS = {
    #    'view' : ViewAction({
    #        'html' : TransformChain(
    #            [TransformMap('%(xslt-base-uri)s/modules/myelin/account-html.xslt'),
    #             TransformMap('%(xslt-base-uri)s/modules/myelin/container/source.xslt'),
    #             TransformMap('%(xslt-base-uri)s/modules/myelin/container/view.xslt'),
    #             TransformMap('%(xslt-base-uri)s/formats/html/myelin/container/view.xslt',
    #                          ['%(i18n-common-base-uri)s/formats/html/myelin/container/view.xml',
    #                          '%(i18n-theme-base-uri)s/formats/html/myelin/container/view.xml'])
    #            ]),
    #        'html-print' : TransformChain(
    #            [TransformMap('%(xslt-base-uri)s/modules/myelin/account-html.xslt'),
    #             TransformMap('%(xslt-base-uri)s/modules/myelin/container/source.xslt'),
    #             TransformMap('%(xslt-base-uri)s/modules/myelin/container/view.xslt'),
    #             TransformMap('%(xslt-base-uri)s/formats/html/myelin/container/view.xslt',
    #                          ['%(i18n-common-base-uri)s/formats/html/myelin/container/view.xml',
    #                          '%(i18n-theme-base-uri)s/formats/html/myelin/container/view.xml'])
    #            ]),
    #        'mml' : TransformChain(
    #            [TransformMap('%(xslt-base-uri)s/modules/myelin/account-html.xslt'),
    #             TransformMap('%(xslt-base-uri)s/modules/myelin/container/source.xslt'),
    #             TransformMap('%(xslt-base-uri)s/modules/myelin/container/view.xslt')             
    #            ])
    #    })
    #}


NODE_TYPES = {
    MYELIN + 'Container' : Container,
}


    